﻿namespace PlantsZombies.Common
{
    public class BulletPoint
    {
        public string Id { get; set; }
        public int Index { get; set; }
        private int _x;
        public int X
        {
            get { return _x; }
            set
            {
                _x = value;
                OriginaX = value;
            }
        }
        private int _y;
        public int Y
        {
            get { return _y; }
            set
            {
                _y = value;
                OriginaY = value;
            }
        }
        public int Row { get; set; }    
        public int Col { get; set; }
        public bool AutoRemove {  get; set; }
        private int _originalX = int.MinValue;
        private int _originalY = int.MinValue;
        public int OriginaX
        {
            get { return _originalX; }
            set
            {
                if (_originalX != int.MinValue) return;
                _originalX = value;
            }
        }
        public int OriginaY
        {
            get { return _originalY; }
            set
            {
                if (_originalY != int.MinValue) return;
                _originalY = value;
            }
        }
    }
}
